package ynu.edu.order.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import ynu.edu.common.result.Result;
import ynu.edu.order.vo.DishSpecVO;
import ynu.edu.order.vo.DishVO;

import java.math.BigDecimal;

/**
 * 菜品服务Feign客户端
 */
@FeignClient(name = "dish-service", fallback = DishClientFallback.class)
public interface DishClient {

    /**
     * 根据菜品ID获取菜品信息
     * @param id 菜品ID
     * @return 菜品信息
     */
    @GetMapping("/internal/dishes/{id}")
    Result<DishVO> getDishById(@PathVariable("id") Long id);

    /**
     * 根据菜品规格ID获取菜品规格信息
     * @param id 菜品规格ID
     * @return 菜品规格信息
     */
    @GetMapping("/internal/dish-specs/{id}")
    Result<DishSpecVO> getDishSpecById(@PathVariable("id") Long id);
} 